"use strict";
var tips = {},
ii = {
  errMsg: "系统发生错误，请稍后重试",
  sucMsg: "操作成功",
  delay: 2
},
s;
function o(e, t, n) {
  $(".JS_TIPS").remove(),
  s = $(template.compile('<div class="JS_TIPS page_tips {type}" id="wxTips_' + (new Date).getTime() + '"><div class="inner">{=msg}</div></div>')({
    type: e || "error",
    msg: t
  })).appendTo("body").fadeIn(), u.delay(n || ii.delay, s);
};
function u(e) {
  e.length > 0 && e.fadeOut({
    complete: function() {
      e.remove();
    }
  });
};
tips.err = function(e, t) {
  o("error", e || ii.errMsg, t);
};
tips.suc = function(e, t) {
  o("success", e || ii.sucMsg, t);
};